<?php if(isset($_SESSION["Admin"])){ ?>
  <div class="mainbar">

  <div class="container">

    <div class="mainbar-collapse collapse">

      <ul class="nav navbar-nav mainbar-nav">
<?php if($_SESSION['Admin']->idRefCollege() == NULL){ ?>
        <li <?php if(basename($_SERVER['PHP_SELF']) == "index.php"){ echo 'class="active"'; } ?>>
          <a href="index.php">
            <i class="fa fa-dashboard"></i>
            Dashboard
          </a>
        </li>

		
        <li class="dropdown <?php if( (basename($_SERVER['PHP_SELF']) == "acces_test.php") || (basename($_SERVER['PHP_SELF']) == "acces_resultat.php")){ echo 'class="active"'; } ?>">
          <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
            <i class="fa fa-lock"></i>
            Accès
            <span class="caret"></span>
          </a>
          
          <ul class="dropdown-menu">
          	<li><a href="acces_test.php">Liste des accès aux tests</a></li>
            <li><a href="acces_resultat.php">Liste des accès aux résultats</a></li>
          </ul>
        </li>
            
        
		
      
        <li <?php if(basename($_SERVER['PHP_SELF']) == "college.php"){ echo 'class="active"'; } ?>>
          <a href="college.php">
            <i class="fa fa-users"></i>
            Collèges
          </a>
        </li>
<?php } ?>
        <li class="dropdown <?php if(basename($_SERVER['PHP_SELF']) == "resultats.php" || basename($_SERVER['PHP_SELF']) == "resultats_ip.php" || basename($_SERVER['PHP_SELF']) == "resultats_q.php"){ echo 'active'; } ?>">
        <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
            <i class="fa fa-align-left"></i>
            Résultats
            <span class="caret"></span>
          </a>
          <ul class="dropdown-menu">
          	<li><a href="resultats.php">Résultats aux tests</a></li>
            <li><a href="resultats_ip.php">Résultats aux intérêts professionnels</a></li>
            <li><a href="resultats_q.php">Résultats aux questionnaires</a></li>
          </ul> 
        </li>
<?php if($_SESSION['Admin']->idRefCollege() == NULL){ ?>        
        <li class="dropdown <?php if(basename($_SERVER['PHP_SELF']) == "gestion.php" || basename($_SERVER['PHP_SELF']) == "exercice.php" || basename($_SERVER['PHP_SELF']) == "question.php" || basename($_SERVER['PHP_SELF']) == "reponse.php"){ echo 'active'; } ?>">
          <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
            <i class="fa fa-folder-open-o"></i>
            Tests
            <span class="caret"></span>
          </a>

          <ul class="dropdown-menu">
            <li><a href="gestion.php">Gérer les tests</a></li>
            <li><a href="listexercice.php">Gérer les exercices, question et réponses</a></li>
          </ul>
        </li>

        <li class="dropdown <?php if(basename($_SERVER['PHP_SELF']) == "tools_save.php" || basename($_SERVER['PHP_SELF']) == "tools_restore.php"){ echo 'active'; } ?>">
          <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown">
            <i class="fa fa-gear"></i>
            Outils
            <span class="caret"></span>
          </a>

          <ul class="dropdown-menu">
            <li><a href="tools_save.php">Sauvegarder la Base De Données</a></li>
            <li><a href="tools_restore.php">Restaurer la Base De Données</a></li>
          </ul>
        </li>
<?php } ?>
      </ul>

    </div> <!-- /.navbar-collapse -->   

  </div> <!-- /.container --> 

</div> <!-- /.mainbar -->
<?php } ?>